package org.wkg.lesson10;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

public class Demo_1109 {
    public static void main(String[] args) throws InterruptedException {
        ReentrantLock lock = new ReentrantLock();

        Condition male = lock.newCondition();
        Condition female = lock.newCondition();

        male.await();
        male.signal();
        male.signalAll();

        female.await();
        female.signal();
        female.signalAll();
    }
}
